import { requestClient } from '#/api/request'

/**
 * 获取管理员列表
 */
export async function getAdminList(params: any) {
  return requestClient.get('/admin/auth.admin/index', params)
}

/**
 * 获取货品分类
 */
export async function getGoodsTypeList(params: any) {
  return requestClient.get('/admin/AdminGoodsCategory/index', params)
}

/**
 * 获取字典
 */
export async function getDict(params: any) {
  return requestClient.post('/admin/Dict/addInit', params)
}

/**
 * 获取供应商
 */
export async function getSupplyList(params: any) {
  return requestClient.get('/admin/Supply/index', params)
}

/**
 * 获取公司列表
 */
export async function getCompanyList(params: any) {
  return requestClient.get('/admin/purchase/getCompanyList', params)
}

/**
 * 获取仓库
 */
export async function getWarehouseList(params: any) {
  return requestClient.get('/admin/Warehouse/index', params)
}

/**
 * 获取生产单
 */
export async function getProductOrderList(params: any) {
  return requestClient.get('/admin/ProductOrder/index', params)
}

/**
 * 获取加工厂
 */
export async function getFactoryList(params: any) {
  return requestClient.get('/admin/Factory/index', params)
}

/**
 * 获取物料单位
 */
export async function getMaterialUnitList(params: any) {
  return requestClient.get('/admin/MaterialUnit/index', params)
}

/**
 * 七牛存储回调
 */
export async function qiniuCallback(params: any) {
  return requestClient.get('/admin/Qiniu/callback', params)
}

/**
 * 保存搜索条件
 */
export async function saveSearchTemplate(params: any) {
  return requestClient.post('/admin/SearchTemplate/search_template_add', params)
}

/**
 * 获取搜索条件列表
 */
export async function listSearchTemplate(params: any) {
  return requestClient.post('/admin/SearchTemplate/search_template_list', params)
}

/**
 * 删除搜索条件
 */
export async function deleteSearchTemplate(params: any) {
  return requestClient.post('/admin/SearchTemplate/search_template_delete', params)
}


/**
 * 获取属性配置
 */
export async function getAttrConfig(params: any) {
  return requestClient.post('/admin/attr/getAttrConfig', params)
}


/**
 * 保存采购追踪信息
 */
export async function saveAttrLog(params: any) {
  return requestClient.post('/admin/attr/saveAttrValue', params)
}


/**
 * 获取采购追踪信息
 */
export async function getDetailAttrValue(params: any) {
  return requestClient.post('/admin/attr/getDetailAttrValue', params)
}
